print alternate elements of single linked list